<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="static/css/bootstrap.min.css" rel="stylesheet" />
		<link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="static/css/font-awesome.min.css" />
		<!-- 下拉框 -->
		<link rel="stylesheet" href="static/css/chosen.css" />
		
		<link rel="stylesheet" href="static/css/ace.min.css" />
		<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="static/css/ace-skins.min.css" />
		
		<link rel="stylesheet" href="static/css/datepicker.css" /><!-- 日期框 -->
		<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="static/js/jquery.tips.js"></script>
		
<script type="text/javascript">
	
	
	//保存
	function save(){
			if($("#AL_CODE").val()==""){
			$("#AL_CODE").tips({
				side:3,
	            msg:'请选择公司',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#AL_CODE").focus();
			return false;
		}
		if($("#EI_DEPARTMENT").val()==""){
			$("#EI_DEPARTMENT").tips({
				side:3,
	            msg:'请输入员工部门',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_DEPARTMENT").focus();
			return false;
		}
		if($("#EI_NAME").val()==""){
			$("#EI_NAME").tips({
				side:3,
	            msg:'请输入员工姓名',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_NAME").focus();
			return false;
		}
		if($("#EI_TEL").val()==""){
			$("#EI_TEL").tips({
				side:3,
	            msg:'请输入员工手机号',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_TEL").focus();
			return false;
		}
		if($("#EI_SEX").val()==""){
			$("#EI_SEX").tips({
				side:3,
	            msg:'请输入员工性别',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_SEX").focus();
			return false;
		}
		if($("#EI_IDTYPE").val()==""){
			$("#EI_IDTYPE").tips({
				side:3,
	            msg:'请输入员工证件类型',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_IDTYPE").focus();
			return false;
		}
		if($("#EI_ID").val()==""){
			$("#EI_ID").tips({
				side:3,
	            msg:'请输入员工证件号',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_ID").focus();
			return false;
		}
		if($("#EI_STATE").val()==""){
			$("#EI_STATE").tips({
				side:3,
	            msg:'请输入员工状态',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_STATE").focus();
			return false;
		}
		if($("#EI_QUITDATE").val()==""){
			$("#EI_QUITDATE").tips({
				side:3,
	            msg:'请输入离职时间',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EI_QUITDATE").focus();
			return false;
		}
		$("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();
	}
	
</script>
	</head>
<body>
	<form action="airlineemployee/${msg }.do" name="Form" id="Form" method="post">
		<input type="hidden" name="AIRLINEEMPLOYEE_ID" id="AIRLINEEMPLOYEE_ID" value="${pd.AIRLINEEMPLOYEE_ID}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<td style="width:70px;text-align: right;padding-top: 13px;">请选所属航空公司:</td>
			<td>
				<select class="chzn-select" name="AL_CODE" id="AL_CODE" data-placeholder="请选所属航空公司" style="vertical-align:top;">
					<option value=""></option>
					<option value="-1">无所属公司</option>
					<c:forEach items="${airInfoList}" var="airInfo">
						<option value="${airInfo.AIRLINEINFO_ID }" <c:if test="${airInfo.AIRLINEINFO_ID == pd.AIRLINEINFO_ID }">selected</c:if>>${airInfo.AL_NAME }</option>
					</c:forEach>
				</select>
			</td>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工部门:</td>
				<td><input type="text" name="EI_DEPARTMENT" id="EI_DEPARTMENT" value="${pd.EI_DEPARTMENT}" maxlength="32" placeholder="这里输入员工部门" title="员工部门"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">航空公司员工编号:</td>
				<td><input type="text" name="EI_EMINFO" id="EI_EMINFO" value="${pd.EI_EMINFO}" maxlength="32" placeholder="这里输入航空公司员工编号" title="航空公司员工编号"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工姓名:</td>
				<td><input type="text" name="EI_NAME" id="EI_NAME" value="${pd.EI_NAME}" maxlength="32" placeholder="这里输入员工姓名" title="员工姓名"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工手机号:</td>
				<td><input type="text" name="EI_TEL" id="EI_TEL" value="${pd.EI_TEL}" maxlength="32" placeholder="这里输入员工手机号" title="员工手机号"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工性别:</td>
				<td>
					<select class="chzn-select" name="EI_SEX" id="EI_SEX" data-placeholder="请选员工性别" style="vertical-align:top;">
						<option value=""></option>
						<c:forEach items="${sexMap}" var="entry">
							<option value="${entry.key }" <c:if test="${entry.value == pd.EI_SEX }">selected</c:if>>${entry.value }</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工证件类型:</td>
				<td>
					<select class="chzn-select" name="EI_IDTYPE" id="EI_IDTYPE" data-placeholder="请选证件类型" style="vertical-align:top;">
						<option value=""></option>
						<c:forEach items="${paperTypeMap}" var="entry">
							<option value="${entry.key }" <c:if test="${entry.value == pd.EI_IDTYPE }">selected</c:if>>${entry.value }</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">员工证件号:</td>
				<td><input type="text" name="EI_ID" id="EI_ID" value="${pd.EI_ID}" maxlength="32" placeholder="这里输入员工证件号" title="员工证件号"/></td>
			</tr>
			<c:if test="${msg == 'save'}">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">账户授信:</td>
					<td><input  name="SA_CREDITLINE" id="SA_CREDITLINE" value="${pd.SA_CREDITLINE}" type="text" data-date-format="yyyy-mm-dd" style="width:88px;" placeholder="账户授信"/></td>
				</tr>
			</c:if>
			<c:if test="${msg == 'edit'}">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">账户授信:</td>
					<td><input  name="SA_CREDITLINE" id="SA_CREDITLINE" value="${pd.SA_CREDITLINE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="账户授信"/></td>
				</tr>
			</c:if>
			<c:if test="${msg == 'edit'}">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">员工状态:</td>
					<td>
						<select class="chzn-select" name="EI_STATE" id="EI_STATE" data-placeholder="请选员工状态" style="vertical-align:top;">
							<option value=""></option>
							<c:forEach items="${workState}" var="entry">
								<option value="${entry.key }" <c:if test="${entry.value == pd.EI_IDTYPE }">selected</c:if>>${entry.value }</option>
							</c:forEach>
						</select>
					</td>
				</tr>
			</c:if>
			<c:if test="${msg == 'edit'}">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">离职时间:</td>
					<td><input class="span10 date-picker" name="EI_QUITDATE" id="EI_QUITDATE" value="${pd.EI_QUITDATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="离职时间"/></td>
				</tr>
			</c:if>
			<c:if test="${msg == 'edit'}">
				<tr>
					<td style="width:70px;text-align: right;padding-top: 13px;">最新更新时间:</td>
					<td><input type="text" name="EI_NETINTIME" id="EI_NETINTIME" value="${pd.EI_NETINTIME}" maxlength="32" placeholder="这里输入录入时间" title="录入时间" readonly="readonly"/></td>
				</tr>
			</c:if>
			<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
					<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
				</td>
			</tr>
		</table>
		</div>
		
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
	
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
			
		});
		
		</script>
</body>
</html>